-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQT-compatible pre-commit + GitHub actions for 10, 11, 12 #132
Conversation
Hi @carmenbianca.
I'm afraid that changing the CI system on these "old" branches requires a lot of work here if you want all the branches to stay green. some choices :
@sbidoul : any point of view regarding that topic as a Board member ? |
There are 3 kinds of faliure there:
|
So in principle, the only kind of errors should be related to invalid external dependencies where the new GitHub actions are stricter. So I'd suggest digging a little bit more before deciding to keep travis. |
@legalsylvain I did some mergin' Regarding impact on older branches here is a typical example of what needs to be done to fix dependencies: OCA/server-tools#2315. These changes are needed to make runboat work and changes made to please runboat are a prerequisite to please GitHub actions. That said, runboat being green is not necessary for a merge, so... we may still decide to keep Travis if this proves too difficult. |
a6a90f6
to
fffcb8f
Compare
Made some progress. OCA/pos#773 mostly passes, except some I chose to make flake8 run by pinning the Python version to 3.6 in the pre-commit config. This works for the following cases:
But it doesn't work for the tests in this repo. I'm not sure which knobs to twist to make that work, but I'll give it a look. |
526554b
to
33efe3c
Compare
Ready for review! |
include: | ||
- python-version: 2.7 | ||
odoo-version: 10.0 | ||
exclude: | ||
- python-version: 3.8 | ||
odoo-version: 11.0 | ||
- python-version: 3.8 | ||
odoo-version: 12.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the test of the template, why does it depend on the Odoo/python version combination ?
@sbidoul I somehow made it impossible to reply to your review. The reason the template tests are pinned is because I could also fix this in the tests by pinning that test |
0892ed2
to
e78684a
Compare
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
The flake8 version used by these Odoo versions does not work with more recent versions of Python. Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
e78684a
to
add4eca
Compare
@sbidoul @legalsylvain this PR needs a review before it becomes stale :) |
Ok, lets merge this and see how it works. Thank you for your work on this @carmenbianca. Much appreciated! |
Thank you for the job! :) Have any of you tested this for version 10.0? I am stuck in the installation of test-requirements file:
Thanks in advance. |
@AaronHForgeFlow you probably have a mix of Odoo 9 and Odoo 10 addons in your repo ? Please check the versions in the manifests. |
@sbidoul You are right. The modules are installable=False but it seems that is not valid. I will remove those modules. Thank you! |
Hm, if they are installable false they should be ignored. |
That's weird, I'd be interested in more logs about that. Could you open an issue in oca/oca-ci ? |
I just checked twice and there was one module with installable=True and version 9.0.1.0.0. So there's no issue with oca/oca-ci . Sorry for the confusion here. |
{%- if odoo_version < 13 %} | ||
{%- include "version-specific/mqt-compat/.pre-commit-config.yaml.jinja" %} | ||
|
||
{%- elif odoo_version < 14 %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that this line breaks updates for version < 13 as there is only one version-specific/13.0
folder... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unlikely to me. It includes version-specific/mqt-compat
, not version-specific/12.0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's about the line {%- elif odoo_version < 14 %}
That includes the {%- include "version-specific/%s/.pre-commit-config.yaml" % odoo_version %}
part.
The line under mqt-compat 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh I see; it's an elif
.
But it seems to pass in that one for a 12.0 version.
Maybe the blank line ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's a string/float problem? It expects a float where there should be a string, or vice versa? Frankly I'm not sure. I wish I knew how to help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try replacing odoo_version
with odoo_version|float
or odoo_version|int
in these checks. Just in case you're passing the version as a string for some reason.
Also make sure you're using the latest copier.
Duplicate of #117, but from a branch I can write to.
Fixes #103